package com.kitty.web.client;


import com.kitty.common.utils.SpringUtils;
import com.kitty.game.gm.handler.GMFather;
import com.kitty.game.role.model.Role;
import com.kitty.web.client.service.AiService;
import org.springframework.stereotype.Service;

@Service
public class GmCreateAi implements GMFather {

    @Override
    public boolean handle(Role aaaaa, String content) {
        AiInfo aiInfo2= new AiInfo();
        String level = content.split(",")[0];
        String num = content.split(",")[1];
        aiInfo2.setLevel(Integer.parseInt(level));
        aiInfo2.setAiNum(Integer.parseInt(num));
        SpringUtils.getBean(AiService.class).createAi(aiInfo2);
        return true;
    }
}
